from fastapi import Depends, FastAPI

from app.dependencies import get_query_token, get_token_header
from app.internal import admin
from app.routers import items, users

# 配置全局 token
app = FastAPI()

app.include_router(users.router)
app.include_router(items.router)
app.include_router(
    admin.router,
    prefix="/admin",
    tags=["管理员"],
    dependencies=[Depends(get_token_header), Depends(get_query_token)],
    responses={418: {"description": "自定义返回状态描述qqq"}},
)
